<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>vue插槽</title>
		<script src="../vue.js"></script>
	</head>
	<body>
		<div id="app">
				<h1>插槽</h1>
				<mycomp>
					<h3 slot="usb" style="color:red">你好，这是usb</h3>
				</mycomp>
		</div>
		<template id="mycomponent">
			<div>
				<p>上部</p>	
				<slot name="cpu">cc</slot>
				<slot name="gpu">pp</slot>
				<slot name="usb">usb</slot>
				<slot name="common">common</slot>
				<footer>下部</footer>
			</div>
		</template>
		<script>
		 var vm=new Vue({
			 el:'#app',
			 components:{
				 mycomp:{
					 template:'#mycomponent'
				 }
			 }
		 })
		</script>
	</body>
</html>
